package com.corona.game;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Pixmap;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.TextureData;
import com.badlogic.gdx.math.Matrix4;
import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.math.Vector2;
import com.corona.Game;
import com.corona.game.util.TextureCache;
import java.util.ArrayList;
import java.util.Iterator;

/* compiled from: PkmnMap.java */
/* loaded from: pokewilds.jar:com/pkmngen/game/FogEffect.class */
public class FogEffect extends Action {
    Pixmap fogPixmap1;
    Pixmap fogPixmap2;
    Texture shadeTexture1;
    Texture shadeTexture2;
    Pixmap shadePixmap1;
    Pixmap shadePixmap2;
    Texture smokeTexture1;
    Texture smokeTexture2;
    Pixmap smokePixmap1;
    Pixmap smokePixmap2;
    Vector2 startPos;
    Vector2 endPos;
    Pixmap pixmap;
    Texture texture;
    LightenScreen lightenScreen;
    public static Type type = null;
    public static boolean refresh = true;
    public static Rectangle effectArea = new Rectangle(0.0f, 0.0f, 64.0f, 64.0f);
    public Action.Layer layer = Action.Layer.map_0;
    ArrayList<Vector2> fogPositions1 = new ArrayList<>();
    ArrayList<Vector2> fogPositions2 = new ArrayList<>();
    int timer = 0;
    Color prevColor = new Color();
    Vector2 currOffset = new Vector2();
    Vector2 prevPos = new Vector2();
    Vector2 newPos = new Vector2();
    ArrayList<Vector2> positionsQueue = new ArrayList<>();
    Type prevType = null;
    Texture fogTexture1 = TextureCache.get(Gdx.files.internal("fog1_alpha.png"));
    Texture fogTexture2 = TextureCache.get(Gdx.files.internal("fog2_alpha.png"));

    /* compiled from: PkmnMap.java */
    /* loaded from: pokewilds.jar:com/pkmngen/game/FogEffect$Type.class */
    public enum Type {
        SMOKE,
        FOG,
        DEEPFOREST
    }

    public FogEffect() {
        super(new Object[0]);
        TextureData temp = this.fogTexture1.getTextureData();
        if (!temp.isPrepared()) {
            temp.prepare();
        }
        this.fogPixmap1 = temp.consumePixmap();
        TextureData temp2 = this.fogTexture2.getTextureData();
        if (!temp2.isPrepared()) {
            temp2.prepare();
        }
        this.fogPixmap2 = temp2.consumePixmap();
        this.shadeTexture1 = TextureCache.get(Gdx.files.internal("shade5.png"));
        this.shadeTexture2 = TextureCache.get(Gdx.files.internal("shade6.png"));
        TextureData temp3 = this.shadeTexture1.getTextureData();
        if (!temp3.isPrepared()) {
            temp3.prepare();
        }
        this.shadePixmap1 = temp3.consumePixmap();
        TextureData temp4 = this.shadeTexture2.getTextureData();
        if (!temp4.isPrepared()) {
            temp4.prepare();
        }
        this.shadePixmap2 = temp4.consumePixmap();
        this.smokeTexture1 = TextureCache.get(Gdx.files.internal("shade3_dithered.png"));
        this.smokeTexture2 = TextureCache.get(Gdx.files.internal("shade4_dithered.png"));
        TextureData temp5 = this.smokeTexture1.getTextureData();
        if (!temp5.isPrepared()) {
            temp5.prepare();
        }
        this.smokePixmap1 = temp5.consumePixmap();
        TextureData temp6 = this.smokeTexture2.getTextureData();
        if (!temp6.isPrepared()) {
            temp6.prepare();
        }
        this.smokePixmap2 = temp6.consumePixmap();
        this.pixmap = new Pixmap(880, 576, Pixmap.Format.RGBA8888);
        this.pixmap.setColor(new Color(1.0f, 1.0f, 1.0f, 0.0f));
        this.texture = TextureCache.get(this.pixmap);
    }

    @Override // com.corona.game.Action
    public String getCamera() {
        return "map";
    }

    @Override // com.corona.game.Action
    public Action.Layer getLayer() {
        return this.layer;
    }

    @Override // com.corona.game.Action
    public void firstStep(Game game) {
        this.lightenScreen = new LightenScreen();
    }

    @Override // com.corona.game.Action
    public void step(Game game) {
        if (type != null && !game.map.timeOfDay.equals("night") && game.map.tiles == game.map.overworldTiles) {
            if (type == Type.FOG) {
                fogStep(game);
                this.lightenScreen.step(game);
            } else if (type == Type.DEEPFOREST) {
                deepForestStep(game);
            } else if (type == Type.SMOKE) {
                smokeStep(game);
            }
        }
    }

    public void deepForestStep(Game game) {
        if (refresh) {
            this.positionsQueue.clear();
            Vector2 centerPos = game.player.position.cpy();
            centerPos.x -= (float) Math.floorMod((int) centerPos.x, 16);
            centerPos.y -= (float) Math.floorMod((int) centerPos.y, 16);
            this.startPos = centerPos.cpy().add((float) ((-this.pixmap.getWidth()) / 2), (float) ((-this.pixmap.getHeight()) / 2));
            this.startPos.x -= (float) Math.floorMod((int) this.startPos.x, 16);
            this.startPos.y -= (float) Math.floorMod((int) this.startPos.y, 16);
            this.endPos = centerPos.cpy().add((float) (this.pixmap.getWidth() / 2), (float) (this.pixmap.getHeight() / 2));
            this.endPos.x -= (float) Math.floorMod((int) this.endPos.x, 16);
            this.endPos.y -= (float) Math.floorMod((int) this.endPos.y, 16);
            Vector2 currPos = this.startPos.cpy();
            while (currPos.y <= this.endPos.y) {
                this.positionsQueue.add(currPos.cpy());
                currPos.x += 4.0f;
                if (currPos.x > this.endPos.x) {
                    currPos.x = this.startPos.x;
                    currPos.y += 8.0f;
                }
            }
            effectArea.setCenter(centerPos);
            this.pixmap.fill();
            refresh = false;
            this.fogPositions1.clear();
            this.fogPositions2.clear();
            if (this.prevType != type) {
                this.prevType = type;
                this.texture.draw(this.pixmap, 0, 0);
            }
        }
        int i = 0;
        while (!this.positionsQueue.isEmpty() && i < 768) {
            Vector2 currPos2 = this.positionsQueue.remove(0);
            if (Math.floorMod(((int) currPos2.x) / 4, 2) == Math.floorMod(((int) currPos2.y) / 8, 2)) {
                Vector2 rotate = currPos2.cpy().rotateDeg(0.0f);
                int offset1 = Math.abs(Math.floorMod((int) Math.abs(rotate.x / ((float) 16)), 14) - 7) + Math.abs(Math.floorMod((int) Math.abs(rotate.y / ((float) 16)), 14) - 7);
                int offset2 = (Math.abs(Math.floorMod((int) Math.abs(rotate.x / ((float) 16)), 20) - 10) + Math.abs(Math.floorMod((int) Math.abs(rotate.y / ((float) 16)), 20) - 10)) / 5;
                if (offset1 * offset2 > 7) {
                    this.pixmap.drawPixmap(this.shadePixmap1, (int) (currPos2.x - this.startPos.x), this.pixmap.getHeight() - ((int) (currPos2.y - this.startPos.y)));
                } else if (offset1 * offset2 > 4) {
                    this.pixmap.drawPixmap(this.shadePixmap2, (int) (currPos2.x - this.startPos.x), this.pixmap.getHeight() - ((int) (currPos2.y - this.startPos.y)));
                }
            }
            if (this.positionsQueue.isEmpty()) {
                this.texture.draw(this.pixmap, 0, 0);
                effectArea.getCenter(this.prevPos);
            }
            i++;
        }
        Color tempColor = game.mapBatch.getColor().cpy();
        game.mapBatch.setColor(new Color(1.0f, 1.0f, 1.0f, 0.4f));
        game.mapBatch.draw(this.texture, ((this.prevPos.x + 8.0f) + 32.0f) - ((float) (this.pixmap.getWidth() / 2)), (this.prevPos.y + 8.0f) - ((float) (this.pixmap.getHeight() / 2)));
        game.mapBatch.setColor(tempColor);
    }

    public void fogStep(Game game) {
        if (refresh) {
            this.positionsQueue.clear();
            Vector2 centerPos = game.player.position.cpy();
            centerPos.x -= (float) Math.floorMod((int) centerPos.x, 16);
            centerPos.y -= (float) Math.floorMod((int) centerPos.y, 16);
            this.startPos = centerPos.cpy().add((float) ((-this.pixmap.getWidth()) / 2), (float) ((-this.pixmap.getHeight()) / 2));
            this.startPos.x -= (float) Math.floorMod((int) this.startPos.x, 16);
            this.startPos.y -= (float) Math.floorMod((int) this.startPos.y, 16);
            this.endPos = centerPos.cpy().add((float) (this.pixmap.getWidth() / 2), (float) (this.pixmap.getHeight() / 2));
            this.endPos.x -= (float) Math.floorMod((int) this.endPos.x, 16);
            this.endPos.y -= (float) Math.floorMod((int) this.endPos.y, 16);
            Vector2 currPos = this.startPos.cpy();
            while (currPos.y <= this.endPos.y) {
                this.positionsQueue.add(currPos.cpy());
                currPos.x += 4.0f;
                if (currPos.x > this.endPos.x) {
                    currPos.x = this.startPos.x;
                    currPos.y += 8.0f;
                }
            }
            effectArea.setCenter(centerPos);
            this.pixmap.fill();
            refresh = false;
            this.fogPositions1.clear();
            this.fogPositions2.clear();
            if (this.prevType != type) {
                this.prevType = type;
                this.texture.draw(this.pixmap, 0, 0);
            }
        }
        int i = 0;
        while (!this.positionsQueue.isEmpty() && i < 768) {
            Vector2 currPos2 = this.positionsQueue.remove(0);
            if (Math.floorMod(((int) currPos2.x) / 8, 2) == Math.floorMod(((int) currPos2.y) / 16, 2)) {
                Vector2 rotate = currPos2.cpy().rotateDeg(0.0f);
                int offset1 = Math.abs(Math.floorMod((int) ((rotate.x / ((float) 16)) - (rotate.y / ((float) 16))), 14) - 7) + Math.abs(Math.floorMod((int) (rotate.y / ((float) 16)), 14) - 7);
                int offset2 = offset1 * ((Math.abs(Math.floorMod((int) (rotate.x / ((float) 16)), 20) - 10) + Math.abs(Math.floorMod((int) (rotate.y / ((float) 16)), 20) - 10)) / 5);
                if (offset2 > 9) {
                    Vector2 newPos = currPos2.cpy().add((float) ((offset2 % 3) - 1), (float) ((offset1 % 3) - 1));
                    this.pixmap.drawPixmap(this.fogPixmap2, (int) (newPos.x - this.startPos.x), this.pixmap.getHeight() - ((int) (newPos.y - this.startPos.y)));
                }
                if (offset2 > 11) {
                    Vector2 newPos2 = currPos2.cpy().add((float) ((offset2 % 3) - 1), (float) ((offset1 % 3) - 1));
                    this.pixmap.drawPixmap(this.fogPixmap1, (int) (newPos2.x - this.startPos.x), this.pixmap.getHeight() - ((int) (newPos2.y - this.startPos.y)));
                }
                if (offset2 > 13) {
                    Vector2 newPos3 = currPos2.cpy().add((float) ((offset2 % 3) - 1), (float) ((offset1 % 3) - 1));
                    this.pixmap.drawPixmap(this.fogPixmap1, (int) (newPos3.x - this.startPos.x), this.pixmap.getHeight() - ((int) (newPos3.y - this.startPos.y)));
                    Vector2 newPos4 = currPos2.cpy().add((float) ((offset1 % 3) - 1), 4.0f);
                    this.pixmap.drawPixmap(this.fogPixmap1, (int) (newPos4.x - this.startPos.x), this.pixmap.getHeight() - ((int) (newPos4.y - this.startPos.y)));
                }
            }
            if (this.positionsQueue.isEmpty()) {
                this.texture.draw(this.pixmap, 0, 0);
                effectArea.getCenter(this.prevPos);
            }
            i++;
        }
        this.prevColor.set(game.mapBatch.getColor());
        game.mapBatch.setColor(1.0f, 1.0f, 1.0f, 1.0f);
        game.mapBatch.draw(this.texture, (((this.prevPos.x + 8.0f) + 32.0f) - ((float) (this.pixmap.getWidth() / 2))) + this.currOffset.x, ((this.prevPos.y + 8.0f) - ((float) (this.pixmap.getHeight() / 2))) + this.currOffset.y);
        this.timer++;
        if (this.timer >= 151) {
            this.currOffset.add(-2.0f, 0.0f);
            this.timer = 0;
        }
        game.mapBatch.setColor(this.prevColor);
    }

    public void coolCloudsEffect(Game game) {
        if (refresh) {
            this.pixmap.fill();
            this.prevPos.set(game.player.position.x, game.player.position.y);
            refresh = false;
            this.fogPositions1.clear();
            this.fogPositions2.clear();
            this.startPos = game.player.position.cpy().add(-384.0f, -256.0f);
            this.startPos.x -= this.startPos.x % 16.0f;
            this.startPos.y -= this.startPos.y % 16.0f;
            this.endPos = game.player.position.cpy().add(384.0f, 256.0f);
            this.endPos.x -= this.endPos.x % 16.0f;
            this.endPos.y -= this.endPos.y % 16.0f;
            Vector2 currPos = this.startPos.cpy();
            while (currPos.y <= this.endPos.y) {
                if ((currPos.x / 8.0f) % 2.0f == (currPos.y / 16.0f) % 2.0f) {
                    Vector2 rotate = currPos.cpy().sub(this.currOffset).rotate(0.0f);
                    int offset1 = Math.abs((((int) Math.abs((rotate.x / ((float) 16)) - (rotate.y / ((float) 16)))) % 14) - 7) + Math.abs((((int) Math.abs(rotate.y / ((float) 16))) % 14) - 7);
                    int offset2 = (Math.abs((((int) Math.abs(rotate.x / ((float) 16))) % 20) - 10) + Math.abs((((int) Math.abs(rotate.y / ((float) 16))) % 20) - 10)) / 5;
                    if (offset1 * offset2 > 9) {
                        this.fogPositions2.add(currPos.cpy().add((float) (Game.rand.nextInt(3) - 1), (float) (Game.rand.nextInt(3) - 1)));
                    }
                    if (offset1 * offset2 > 11) {
                        this.fogPositions1.add(currPos.cpy().add((float) (Game.rand.nextInt(3) - 1), (float) (Game.rand.nextInt(3) - 1)));
                    }
                    if (offset1 * offset2 > 13) {
                        this.fogPositions1.add(currPos.cpy().add((float) (Game.rand.nextInt(3) - 1), (float) (Game.rand.nextInt(3) - 1)));
                        this.fogPositions1.add(currPos.cpy().add((float) (Game.rand.nextInt(3) - 1), 4.0f));
                    }
                }
                currPos.x += 4.0f;
                if (currPos.x > this.endPos.x) {
                    currPos.x = this.startPos.x;
                    currPos.y += 8.0f;
                }
            }
            Iterator<Vector2> it = this.fogPositions1.iterator();
            while (it.hasNext()) {
                Vector2 currPos2 = it.next();
                this.pixmap.drawPixmap(this.shadePixmap1, (int) (currPos2.x - this.startPos.x), (int) (currPos2.y - this.startPos.y));
            }
            Iterator<Vector2> it2 = this.fogPositions2.iterator();
            while (it2.hasNext()) {
                Vector2 currPos3 = it2.next();
                this.pixmap.drawPixmap(this.shadePixmap2, (int) (currPos3.x - this.startPos.x), (int) (currPos3.y - this.startPos.y));
            }
        }
        Color tempColor = game.mapBatch.getColor().cpy();
        game.mapBatch.setColor(new Color(1.0f, 1.0f, 1.0f, 0.4f));
        this.texture.draw(this.pixmap, 0, 0);
        game.mapBatch.draw(this.texture, (this.prevPos.x + 8.0f) - 320.0f, (this.prevPos.y + 8.0f) - 216.0f);
        game.mapBatch.setColor(tempColor);
    }

    public void smokeStepTriedButFailedX2(Game game) {
        if (refresh) {
            effectArea.setCenter(game.player.position);
            this.pixmap.fill();
            refresh = false;
            int width = this.pixmap.getWidth() / 2;
            int height = this.pixmap.getHeight() / 2;
            if (this.prevPos == null) {
                this.prevPos = new Vector2(game.player.position.x - ((float) width), game.player.position.y - ((float) height));
            }
            this.newPos.set(game.player.position.x - ((float) width), game.player.position.y - ((float) height));
            this.newPos.x -= this.prevPos.x - this.newPos.x;
            this.newPos.y -= this.prevPos.y - this.newPos.y;
            this.newPos = this.newPos.sub(this.currOffset);
            int modX = Math.floorMod((int) this.newPos.x, 16);
            int modY = Math.floorMod((int) this.newPos.y, 16);
            this.newPos.x -= (float) modX;
            this.newPos.y -= (float) modY;
            this.currOffset.x += (float) modX;
            this.currOffset.y += (float) modY;
            this.prevPos.set(this.newPos);
            this.startPos = this.newPos.cpy();
            this.endPos = this.startPos.cpy().add((float) this.pixmap.getWidth(), (float) this.pixmap.getHeight());
            this.fogPositions1.clear();
            this.fogPositions2.clear();
            Vector2 currPos = this.startPos.cpy();
            while (currPos.y <= this.endPos.y) {
                if (Math.floorMod(((int) currPos.x) / 8, 2) == Math.floorMod(((int) currPos.y) / 16, 2)) {
                    Vector2 rotate = currPos.cpy().rotateDeg(0.0f);
                    int offset1 = Math.abs((((int) Math.abs((rotate.x / ((float) 16)) - (rotate.y / ((float) 16)))) % 14) - 7) + Math.abs(((int) (Math.abs(rotate.y / ((float) 16)) % 14.0f)) - 7);
                    int offset2 = offset1 * ((Math.abs((((int) Math.abs(rotate.x / ((float) 16))) % 20) - 10) + Math.abs(((int) (Math.abs(rotate.y / ((float) 16)) % 20.0f)) - 10)) / 5);
                    if (offset2 > 17) {
                        this.pixmap.drawPixmap(this.smokePixmap1, (int) (((currPos.x + ((float) (offset2 % 3))) - 1.0f) - this.startPos.x), this.pixmap.getHeight() - ((int) (((currPos.y + ((float) (offset1 % 3))) - 1.0f) - this.startPos.y)));
                    } else if (offset2 > 9) {
                        this.pixmap.drawPixmap(this.smokePixmap2, (int) (((currPos.x + ((float) (offset2 % 3))) - 1.0f) - this.startPos.x), this.pixmap.getHeight() - ((int) (((currPos.y + ((float) (offset1 % 3))) - 1.0f) - this.startPos.y)));
                    }
                }
                currPos.x += 4.0f;
                if (currPos.x > this.endPos.x) {
                    currPos.x = this.startPos.x;
                    currPos.y += 8.0f;
                }
            }
            this.texture.draw(this.pixmap, 0, 0);
        }
        this.prevColor.set(game.mapBatch.getColor());
        game.mapBatch.setColor(this.prevColor.r, this.prevColor.g, this.prevColor.b, 0.5f);
        game.mapBatch.draw(this.texture, this.prevPos.x + this.currOffset.x, this.prevPos.y + this.currOffset.y);
        this.timer++;
        if (this.timer >= 20) {
            this.currOffset.add(2.0f, 2.0f);
            effectArea.x += 2.0f;
            effectArea.y += 2.0f;
            if (!effectArea.contains(game.player.position)) {
                refresh = true;
                System.out.println("FogEffect refresh");
                System.out.println(effectArea.x);
                System.out.println(effectArea.y);
            }
            this.timer = 0;
        }
        game.mapBatch.setColor(this.prevColor);
    }

    public void smokeStep(Game game) {
        if (refresh) {
            this.positionsQueue.clear();
            Vector2 centerPos = game.player.position.cpy();
            centerPos.x -= (float) Math.floorMod((int) centerPos.x, 16);
            centerPos.y -= (float) Math.floorMod((int) centerPos.y, 16);
            this.startPos = centerPos.cpy().add((float) ((-this.pixmap.getWidth()) / 2), (float) ((-this.pixmap.getHeight()) / 2));
            this.startPos.x -= (float) Math.floorMod((int) this.startPos.x, 16);
            this.startPos.y -= (float) Math.floorMod((int) this.startPos.y, 16);
            this.endPos = centerPos.cpy().add((float) (this.pixmap.getWidth() / 2), (float) (this.pixmap.getHeight() / 2));
            this.endPos.x -= (float) Math.floorMod((int) this.endPos.x, 16);
            this.endPos.y -= (float) Math.floorMod((int) this.endPos.y, 16);
            Vector2 currPos = this.startPos.cpy();
            while (currPos.y <= this.endPos.y) {
                this.positionsQueue.add(currPos.cpy());
                currPos.x += 4.0f;
                if (currPos.x > this.endPos.x) {
                    currPos.x = this.startPos.x;
                    currPos.y += 8.0f;
                }
            }
            effectArea.setCenter(centerPos);
            this.pixmap.fill();
            refresh = false;
            this.fogPositions1.clear();
            this.fogPositions2.clear();
            if (this.prevType != type) {
                this.prevType = type;
                this.texture.draw(this.pixmap, 0, 0);
            }
        }
        int i = 0;
        while (!this.positionsQueue.isEmpty() && i < 768) {
            Vector2 currPos2 = this.positionsQueue.remove(0);
            if (Math.floorMod(((int) currPos2.x) / 8, 2) == Math.floorMod(((int) currPos2.y) / 16, 2)) {
                Vector2 rotate = currPos2.cpy().rotateDeg(0.0f);
                int offset1 = Math.abs((((int) Math.abs((rotate.x / ((float) 16)) - (rotate.y / ((float) 16)))) % 14) - 7) + Math.abs((((int) Math.abs(rotate.y / ((float) 16))) % 14) - 7);
                int offset2 = offset1 * ((Math.abs((((int) Math.abs(rotate.x / ((float) 16))) % 20) - 10) + Math.abs((((int) Math.abs(rotate.y / ((float) 16))) % 20) - 10)) / 5);
                if (offset2 > 17) {
                    this.pixmap.drawPixmap(this.smokePixmap1, (int) (((currPos2.x + ((float) (offset2 % 3))) - 1.0f) - this.startPos.x), this.pixmap.getHeight() - ((int) (((currPos2.y + ((float) (offset1 % 3))) - 1.0f) - this.startPos.y)));
                } else if (offset2 > 9) {
                    this.pixmap.drawPixmap(this.smokePixmap2, (int) (((currPos2.x + ((float) (offset2 % 3))) - 1.0f) - this.startPos.x), this.pixmap.getHeight() - ((int) (((currPos2.y + ((float) (offset1 % 3))) - 1.0f) - this.startPos.y)));
                }
            }
            if (this.positionsQueue.isEmpty()) {
                this.texture.draw(this.pixmap, 0, 0);
                effectArea.getCenter(this.prevPos);
            }
            i++;
        }
        this.prevColor.set(game.mapBatch.getColor());
        game.mapBatch.setColor(this.prevColor.r, this.prevColor.g, this.prevColor.b, 0.5f);
        game.mapBatch.draw(this.texture, (((this.prevPos.x + 8.0f) + 32.0f) - ((float) (this.pixmap.getWidth() / 2))) + this.currOffset.x, ((this.prevPos.y + 8.0f) - ((float) (this.pixmap.getHeight() / 2))) + this.currOffset.y);
        this.timer++;
        if (this.timer >= 151) {
            this.currOffset.add(2.0f, 2.0f);
            this.timer = 0;
        }
        game.mapBatch.setColor(this.prevColor);
    }

    /* compiled from: PkmnMap.java */
    /* loaded from: pokewilds.jar:com/pkmngen/game/FogEffect$LightenScreen.class */
    class LightenScreen extends Action {
        Color prevColor = new Color();
        Matrix4 prevCombined = new Matrix4();
        Texture texture = TextureCache.get(Gdx.files.internal("battle/intro_frame6.png"));

        /* JADX INFO: 'super' call moved to the top of the method (can break code semantics) */
        public LightenScreen() {
            super(new Object[0]);
            FogEffect.this = this$0;
        }

        @Override // com.corona.game.Action
        public String getCamera() {
            return "gui";
        }

        @Override // com.corona.game.Action
        public Action.Layer getLayer() {
            return Action.Layer.gui_0;
        }

        @Override // com.corona.game.Action
        public void step(Game game) {
            if (!(FogEffect.type == null || game.map.timeOfDay.equals("night"))) {
                this.prevColor.set(game.mapBatch.getColor());
                this.prevCombined.set(game.cam.combined);
                game.mapBatch.setProjectionMatrix(Game.identity);
                game.mapBatch.setColor(1.0f, 1.0f, 1.0f, 0.2f);
                for (int i = -1; i < 1; i++) {
                    for (int j = -1; j < 1; j++) {
                        game.mapBatch.draw(this.texture, (float) (256 * i), (float) (256 * j));
                    }
                }
                game.mapBatch.setColor(this.prevColor);
                game.mapBatch.setProjectionMatrix(this.prevCombined);
            }
        }
    }
}
